IF NOT EXISTS(SELECT * FROM dbo.sysobjects where id = object_id(N'dbo.CaseSiteMapping') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
	CREATE TABLE dbo.CaseSiteMapping
		(
			CaseSiteMappingID int IDENTITY(1,1) NOT NULL,
			ParentPortalUrl nvarchar(1000) NOT NULL,
			OldSiteID uniqueidentifier NOT NULL,
			NewSiteID uniqueidentifier NULL,
			OldSiteUrl nvarchar(1000) NULL,
			NewSiteUrl nvarchar(1000) NULL
		)
	ON [PRIMARY]
	
	ALTER TABLE dbo.CaseSiteMapping WITH NOCHECK ADD 
		CONSTRAINT [PK_CaseSiteMapping] PRIMARY KEY CLUSTERED 
			(
			CaseSiteMappingID
			)
	ON [PRIMARY]
END
GO